/*
 * Created on Jun 24, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.peterrussell.contractionTimer.view;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;

import org.peterrussell.contractionTimer.controller.Controller;
import org.peterrussell.contractionTimer.controller.ControllerSingleton;

/**
 * @author peterr
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class AboutListener implements CommandListener {

	/* (non-Javadoc)
	 * @see javax.microedition.lcdui.CommandListener#commandAction(javax.microedition.lcdui.Command, javax.microedition.lcdui.Displayable)
	 */
    public void commandAction(Command cmd, Displayable disp) {
    	About about = (About) disp;
        if (cmd == about.exitCommand) {
        	Controller controller = ControllerSingleton.getController();
        	controller.exit();
        }
        if (cmd == about.contCommand) {
        	Controller controller = ControllerSingleton.getController();
        	controller.dismissAbout();
        }
    }


}
